翻訳と辞書
Words near each other
・ Variance-gamma distribution
・ Variance-stabilizing transformation
・ Variani
・ Varians Oolith Formation
・ Variant
・ Variant (magazine)
・ Variant (novel)
・ Variant Call Format
・ Variant Chinese character
・ Variant cover
・ Variant Creutzfeldt-Jakob disease
・ Variant form
・ Variant form (Unicode)
・ Variant name (geography)
・ Variant object
Variant type
・ Variante
・ Variante di Valico
・ Variantology
・ Variants of association football
・ Variants of PCR
・ Variants of the M113 armored personnel carrier
・ Variar
・ Variara submachine gun
・ Variation
・ Variation (astronomy)
・ Variation (ballet)
・ Variation (game tree)
・ Variation (game)
・ Variation (horse)


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Variant type : ウィキペディア英語版
Variant type

Variant is a data type in certain programming languages, particularly Visual Basic, OCaml, and C++ when using the Component Object Model.
In Visual Basic (and Visual Basic for Applications) the Variant data type is a tagged union that can be used to represent any other data type (for example, integer, floating-point, single- and double-precision, object, etc.) except fixed-length string type and record types. In Visual Basic any variable, not declared explicitly or the type of which is not declared explicitly, is taken to be a variant.
While the use of not explicitly declared variants is not recommended, they can be of use when the needed data type can only be known at runtime, when the data type is expected to vary, or when optional parameters and parameter arrays are desired. In fact, languages with a dynamic type system often have variant as the ''only'' available type for variables.
Among the major changes in Visual Basic .NET, being a .NET language, the variant type was replaced with the .NET ''object'' type. There are similarities in concept, but also major differences, and no direct conversions exist between these two types. For conversions, as might be needed if Visual Basic .NET code is interacting with a Visual Basic 6 COM object, the normal methodology is to use .NET marshalling.
In unrelated usage, ''variant type'' is also used to refer to an algebraic data type (comparable to a tagged union), whose constructors are often called ''variants''. In languages such as OCaml and Haskell, this kind of variant type is the standard language building block for representing many data structures.
==Examples==

In Visual Basic, a variant named A can be explicitly declared as shown in either of these two examples:

Dim A
Dim A as Variant

In Delphi, a variant named A is declared in the following way:

var A: variant;


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Variant type」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.